﻿//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
// 프로그램 명		: frmCodeRole.cs
// 프로그램 기능    : BOM Code (Cad / Part / Purchasing Part) Role
// 클래스 기능		: 
//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
// 개발자			: 김승현, 조범준
// 개발일			: 2014-06-28
//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
// F/W 버전		    : Dot NET Compack Framework 4.0 Service Pack 1 Patch
// 라이센스			: Copyright ⓒ 2014-2014 All rights reserved.
//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
// 명명규칙			: 클래스(class) 명				- "c" + 클래스명
//					  전역(private) 상수			- "MC_" + 상수명
//					  공용(public)  상수			- "PC_" + 상수명
//					  전역(private) 변수/객체/핸들/구조체/컬렉션/델리게이트
//													- "mv_" + 타입/obj_/hwnd_/stru_/coll_/del_ + 명
//					  공용(public)  변수/객체/핸들/구조체/컬렉션/델리게이트/이벤트
//													- "pv_" + 타입/obj_/hwnd_/stru_/coll_/del_/evnt_ + 명
//					  공용(public)  속성(Property)	- "pp_" + 타입 + 속성명
//					  전역(private) 함수/API		- "mf_" + 함수명/API 함수명
//					  공용(public)  함수/API		- "pf_" + 함수명/API 함수명
//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
// 개발자는 개발/수정시 위의 내용을 반드시 작성하며 내용이 일치하지 않을때에는 모든 사항을 개발자가 책임 진다.
//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
namespace TimsXBX
{
	///▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
	/// <summary>frmCodeRole 클래스</summary>
	///▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
	public partial class frmCodeRole : Form
	{
		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [생성자/소멸자]
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>생성자</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		public frmCodeRole(frmMain fMain, string sJobName)
		{
			InitializeComponent();

			this.mv_frmMain = fMain;
			this.mv_sJobName = sJobName;
		}
		public frmCodeRole(frmMain fMain)
		{
			InitializeComponent();

			this.mv_frmMain = fMain;
		}
		public frmCodeRole()
		{
			InitializeComponent();
			mf_Init(this);
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>소멸자</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		~frmCodeRole()
		{
			mf_UnInit(this);
		}
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [전역(private) 상수 - 클래스 내부만 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 상수명 첫 문자는 "MC_" 로 시작
		//         - 전체를 영문 대문자로 하고 상수명이 긴 경우 '_'로 구분해서 명명
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		///<summary>전역(private) 상수 선언 예</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private const string MC_HELLO = "Hello...";
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [공용(public) 상수 - 클래스 외부로 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 상수명 첫 문자는 "PC_" 로 시작
		//         - 전체를 영문 대문자로 하고 상수명이 긴 경우 '_'로 구분해서 명명
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		///<summary>공용(public) 상수 선언 예</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		public const string PC_HELLO = "Hello...";
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [전역(private) 변수/객체/핸들/구조체/컬렉션/델리게이트 - 클래스 내부만 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 첫 문자를 "mv_타입"/"mv_obj"/"mv_hwnd"/"mv_struc"/"mv_coll"/"mv_del" 로 시작
		//         - 영문 대소문자로 시작하고 변수명이 긴 경우 대소문자 구분해서 명명('_' 사용가능!)
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>전역(private) 변수 선언 예</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private string mv_sHello = null;
		//---------------------------------------------------------------------------------------------------
		//메인 폼 객체 핸들
		//---------------------------------------------------------------------------------------------------
		private frmMain mv_frmMain = null;										//메인 폼 인스턴스 핸들
		private ComCls.cFunction mv_oFunc = null;								//공용함수 인스턴스 핸들
		private string mv_sJobName = null;										//작업구분(Part/Cad/Purchasing Part)
		private int mv_nJobCode = 0;											//작업별 DB 저장 코드
		//---------------------------------------------------------------------------------------------------
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [공용(public) 변수/객체/핸들/구조체/컬렉션/델리게이트/이벤트 - 클래스 외부로 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 첫 문자를 "pv_타입"/"pv_obj"/"pv_hwnd"/"pv_struc"/"pv_coll"/"pv_del"/"pv_event" 로 시작
		//         - 영문 대소문자로 시작하고 변수명이 긴 경우 대소문자 구분해서 명명('_' 사용가능!)
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>공용(public) 변수 선언 예</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		public string pv_sHello = null;
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [공용(public) 속성(Property:읽기 쓰기 선택적 가능) - 클래스 외부로 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 첫 문자를 "pp_타입" 로 시작
		//         - 영문 대소문자로 시작하고 속성명이 긴 경우 대소문자 구분해서 명명('_' 사용가능!)
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>공용(public) 속성(Property) 선언 예</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		public string pp_bHello
		{
			get { return mv_sHello; }
			set { mv_sHello = value; }
		}

		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Primary Code Value를 다른 폼(frmCodeListForRole)으로 부터 값을 받아오기 위한 Property</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		public string pp_PrimaryPatternCodeValue
		{
			set { this.txtPrimaryPatternCode.Text = value; }
		}
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [전역(private) 함수/API - 클래스 내부만 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 첫 문자를 "mf_" + 함수명 또는 API 함수명 으로 시작
		//         - 영문 대소문자로 시작하고 함수명이 긴 경우 대소문자 구분해서 명명('_' 사용가능!)
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>전역(private) 함수 선언 예</summary>
		/// <param name="sStr">전역(private) 함수 인자 선언 예</param>
		/// <returns>string</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private string mf_Hello(string sStr)
		{
			try
			{
				sStr = "Hello...";
			}
			catch (Exception ex)
			{
				throw ex;
			}

			return sStr;
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>클래스 초기화</summary>
		/// <param name="objClass">클래스 객체 인스턴스</param>
		/// <returns>void</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private void mf_Init(frmCodeRole objClass)
		{
			try
			{
				//클래스 초기화
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>클래스 마무리</summary>
		/// <param name="objClass">클래스 객체 인스턴스</param>
		/// <returns>void</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private void mf_UnInit(frmCodeRole objClass)
		{
			try
			{
				//클래스 마무리
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Group 별 DB내 저장된 키값(ObjectId) 일기</summary>
		/// <returns>int</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private int mf_GetJobCode()
		{
			//---------------------------------------------------------------------------------------------------
			//Web Sql 정보 관련
			//---------------------------------------------------------------------------------------------------
			string sWebSql = null;
			string sWebArg = null;
			//---------------------------------------------------------------------------------------------------
			//Web Sql 실행 관련
			//---------------------------------------------------------------------------------------------------
			string sDataSet = null;
			DataSet oDataSet = null;
			int nRowCount = 0;
			int nColCount = 0;
			string sErrorMsg = null;
			//---------------------------------------------------------------------------------------------------
			//데이터셋 반환 타입이 PARSE인 경우 사용
			//---------------------------------------------------------------------------------------------------
			string[] saDataSetRows = null;
			string[] saRowSepa = new string[] { ComCls.cConst.PC_SEPARATOR_ROW };

			//반환 할 Group Code 값
			int nJobCode = 0;

			try
			{
				//---------------------------------------------------------------------------------------------------
				//Web Sql 경로 만들기
				//---------------------------------------------------------------------------------------------------
				sWebSql = ComCls.cConst.PC_WEBSQL_WEBPARSE_URL;
				sWebArg = string.Format("?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}",
											ComCls.cConst.PC_WEBSQL_MODE, ComCls.cConst.PC_WEBSQL_MODE_R,
											ComCls.cConst.PC_WEBSQL_TYPE, ComCls.cConst.PC_WEBSQL_TYPE_PARSE,
											ComCls.cConst.PC_WEBSQL_STYLE, ComCls.cConst.PC_WEBSQL_STYLE_SP,
											ComCls.cConst.PC_WEBSQL_CMD_SP, "SP_GET_JOBCODE_R",
											"iNAME", this.mv_sJobName);
				sWebSql += sWebArg;
				//---------------------------------------------------------------------------------------------------
				//Web Sql 실행
				//---------------------------------------------------------------------------------------------------
				if (this.mv_oFunc.pf_WpExecSql(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, ref sDataSet, ref oDataSet, ref nRowCount, ref nColCount, ref sErrorMsg) == true)
				{
					if (sDataSet != null && sDataSet != "")
					{
						//데이터 셋 행 분리
						saDataSetRows = sDataSet.Split(saRowSepa, StringSplitOptions.None);

						if (saDataSetRows != null && saDataSetRows.Length > 0)
						{
							//Parsing 한 데이터 콤보에 추가
							//for (int nRow = 0; nRow < saDataSetRows.Length; nRow++)
							if (saDataSetRows.Length == 1)
							{
								nJobCode = Convert.ToInt32(saDataSetRows[0]);
								//Application.DoEvents();
							}
						}
					}
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
			finally
			{
				//---------------------------------------------------------------------------------------------------
				//Debug Agent 인스턴스 있는 경우
				//---------------------------------------------------------------------------------------------------
				if (this.mv_frmMain.pv_frmDebugAgent != null)
				{
					this.mv_frmMain.pv_frmDebugAgent.pf_OutputDebugInfo(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, sDataSet, oDataSet);
				}
				//---------------------------------------------------------------------------------------------------
			}

			return nJobCode;
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Enable 모드</summary>
		/// <param name="bEnableOK">객체 사용 가능여부</param>
		/// <returns>void</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		public void mf_EnableMode(bool bEnableOK)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//수정 가능 시
				//---------------------------------------------------------------------------------------------------
				if (bEnableOK == true)
				{
					this.btnDeletePatternName.Enabled = true;
					this.btnSaveRole.Enabled = true;
					this.btnDeleteRole.Enabled = true;
					this.btnOpenCodeList.Enabled = true;
					this.txtPrimaryPatternCode.ReadOnly = false;
					this.dgvPatternRole.Enabled = true;
				}
				//---------------------------------------------------------------------------------------------------
				//수정 불가능 시
				//---------------------------------------------------------------------------------------------------
				else
				{
					this.btnDeletePatternName.Enabled = false;
					this.btnSaveRole.Enabled = false;
					this.btnDeleteRole.Enabled = false;
					this.btnOpenCodeList.Enabled = false;
					this.txtPrimaryPatternCode.ReadOnly = true;
					this.dgvPatternRole.Enabled = false;
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Name ListView에 출력</summary>
		/// <returns>void</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private void mf_ReadPatternNameListView()
		{
			//---------------------------------------------------------------------------------------------------
			//Web Sql 정보 관련
			//---------------------------------------------------------------------------------------------------
			string sWebSql = null;
			string sWebArg = null;
			//---------------------------------------------------------------------------------------------------
			//Web Sql 실행 관련
			//---------------------------------------------------------------------------------------------------
			string sDataSet = null;
			DataSet oDataSet = null;
			int nRowCount = 0;
			int nColCount = 0;
			string sErrorMsg = null;

			try
			{
				//---------------------------------------------------------------------------------------------------
				//Web Sql 경로 만들기
				//---------------------------------------------------------------------------------------------------
				sWebSql = ComCls.cConst.PC_WEBSQL_WEBPARSE_URL;
				sWebArg = string.Format("?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}",
											ComCls.cConst.PC_WEBSQL_MODE, ComCls.cConst.PC_WEBSQL_MODE_R,
											ComCls.cConst.PC_WEBSQL_TYPE, ComCls.cConst.PC_WEBSQL_TYPE_PARSE,
											ComCls.cConst.PC_WEBSQL_STYLE, ComCls.cConst.PC_WEBSQL_STYLE_SP,
											ComCls.cConst.PC_WEBSQL_CMD_SP, "SP_CODE_PATTERN_R",
											"iNAME", this.mv_sJobName);
				sWebSql += sWebArg;
				//---------------------------------------------------------------------------------------------------
				//Web Sql 실행
				//---------------------------------------------------------------------------------------------------
				if (this.mv_oFunc.pf_WpExecSql(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, ref sDataSet, ref oDataSet, ref nRowCount, ref nColCount, ref sErrorMsg) == true)
				{
					this.mv_oFunc.pf_WpOutputDataSetToListView(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, this.listViewPatternName, sDataSet, oDataSet, true);
				}
				else
				{
					if (sErrorMsg != null)
					{
						ComCls.cException.ExceptionMessage(this, sErrorMsg, "mf_ReadPatternNameListView()");
					}
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
			finally
			{
				//---------------------------------------------------------------------------------------------------
				//Debug Agent 인스턴스 있는 경우
				//---------------------------------------------------------------------------------------------------
				if (this.mv_frmMain.pv_frmDebugAgent != null)
				{
					this.mv_frmMain.pv_frmDebugAgent.pf_OutputDebugInfo(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, sDataSet, oDataSet);
				}
				//---------------------------------------------------------------------------------------------------
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Primary Code Textbox 출력 / Effection Code ListView에 출력</summary>
		/// <returns>void</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private void mf_ReadPatternCodeListView(string sJobMode, int nObjectId, string sPatternCode)
		{
			//---------------------------------------------------------------------------------------------------
			//Web Sql 정보 관련
			//---------------------------------------------------------------------------------------------------
			string sWebSql = null;
			string sWebArg = null;
			//---------------------------------------------------------------------------------------------------
			//Web Sql 실행 관련
			//---------------------------------------------------------------------------------------------------
			string sDataSet = null;
			DataSet oDataSet = null;
			int nRowCount = 0;
			int nColCount = 0;
			string sErrorMsg = null;

			try
			{
				//---------------------------------------------------------------------------------------------------
				//Web Sql 경로 만들기
				//---------------------------------------------------------------------------------------------------
				sWebSql = ComCls.cConst.PC_WEBSQL_WEBPARSE_URL;
				sWebArg = string.Format("?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}&{10}={11}&{12}={13}",
											ComCls.cConst.PC_WEBSQL_MODE, ComCls.cConst.PC_WEBSQL_MODE_R,
											ComCls.cConst.PC_WEBSQL_TYPE, ComCls.cConst.PC_WEBSQL_TYPE_PARSE,
											ComCls.cConst.PC_WEBSQL_STYLE, ComCls.cConst.PC_WEBSQL_STYLE_SP,
											ComCls.cConst.PC_WEBSQL_CMD_SP, "SP_CODE_PATTERN_Code_R",
											"iJOBMODE", sJobMode,
											"iOBJECTID", nObjectId,
											"iPATTERNCODE", sPatternCode);
				sWebSql += sWebArg;
				//---------------------------------------------------------------------------------------------------
				//Web Sql 실행
				//---------------------------------------------------------------------------------------------------
				if (this.mv_oFunc.pf_WpExecSql(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, ref sDataSet, ref oDataSet, ref nRowCount, ref nColCount, ref sErrorMsg) == true)
				{
					if (sJobMode == "PATTERN_CODE")
					{
						string[] saDataSetRows = null;
						string[] saRowSepa = new string[] { ComCls.cConst.PC_SEPARATOR_ROW };

						try
						{
							this.txtPrimaryPatternCode.Text = "";

							//---------------------------------------------------------------------------------------------------
							//데이터셋 반환 타입이 PARSE인 경우
							//--------------------------------------------------------------------------------------------------
							if (sDataSet != null && sDataSet != "")
							{
								//데이터 셋 행 분리
								saDataSetRows = sDataSet.Split(saRowSepa, StringSplitOptions.None);

								if (saDataSetRows != null && saDataSetRows.Length > 0)
								{
									this.txtPrimaryPatternCode.Text = saDataSetRows[0];
								}
							}
						}
						catch (Exception ex)
						{
							throw ex;
						}

					}
					else if (sJobMode == "EFFECTION_CODE")
						this.mv_oFunc.pf_WpOutputDataSetToListView(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, this.listViewEffectionCode, sDataSet, oDataSet, true);
				}
				else
				{
					if (sErrorMsg != null)
					{
						ComCls.cException.ExceptionMessage(this, sErrorMsg, "mf_ReadPatternNameListView()");
					}
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
			finally
			{
				//---------------------------------------------------------------------------------------------------
				//Debug Agent 인스턴스 있는 경우
				//---------------------------------------------------------------------------------------------------
				if (this.mv_frmMain.pv_frmDebugAgent != null)
				{
					this.mv_frmMain.pv_frmDebugAgent.pf_OutputDebugInfo(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, sDataSet, oDataSet);
				}
				//---------------------------------------------------------------------------------------------------
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Role GridView에 출력</summary>
		/// <returns>void</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private void mf_ReadPatternRoleGridView()
		{
			//---------------------------------------------------------------------------------------------------
			//Web Sql 정보 관련
			//---------------------------------------------------------------------------------------------------
			string sWebSql = null;
			string sWebArg = null;
			//---------------------------------------------------------------------------------------------------
			//Web Sql 실행 관련
			//---------------------------------------------------------------------------------------------------
			string sDataSet = null;
			DataSet oDataSet = null;
			int nRowCount = 0;
			int nColCount = 0;
			string sErrorMsg = null;

			try
			{
				//---------------------------------------------------------------------------------------------------
				//Web Sql 경로 만들기
				//---------------------------------------------------------------------------------------------------
				sWebSql = ComCls.cConst.PC_WEBSQL_WEBPARSE_URL;
				sWebArg = string.Format("?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}&{10}={11}",
											ComCls.cConst.PC_WEBSQL_MODE, ComCls.cConst.PC_WEBSQL_MODE_R,
											ComCls.cConst.PC_WEBSQL_TYPE, ComCls.cConst.PC_WEBSQL_TYPE_PARSE,
											ComCls.cConst.PC_WEBSQL_STYLE, ComCls.cConst.PC_WEBSQL_STYLE_SP,
											ComCls.cConst.PC_WEBSQL_CMD_SP, "SP_CODE_PATTERN_ROLE_R",
											"iNAME", this.mv_sJobName,
											"iPATTERNOBJECTID", Convert.ToInt32(this.listViewPatternName.SelectedItems[0].Text));
				sWebSql += sWebArg;
				//---------------------------------------------------------------------------------------------------
				//Web Sql 실행
				//---------------------------------------------------------------------------------------------------
				if (this.mv_oFunc.pf_WpExecSql(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, ref sDataSet, ref oDataSet, ref nRowCount, ref nColCount, ref sErrorMsg) == true)
				{
					this.mv_oFunc.pf_WpOutputDataSetToDataGridView(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, this.dgvPatternRole, sDataSet, oDataSet, true);
				}
				else
				{
					if (sErrorMsg != null)
					{
						ComCls.cException.ExceptionMessage(this, sErrorMsg, "mf_ReadPatternRoleGridView()");
					}
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
			finally
			{
				//---------------------------------------------------------------------------------------------------
				//Debug Agent 인스턴스 있는 경우
				//---------------------------------------------------------------------------------------------------
				if (this.mv_frmMain.pv_frmDebugAgent != null)
				{
					this.mv_frmMain.pv_frmDebugAgent.pf_OutputDebugInfo(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, sDataSet, oDataSet);
				}
				//---------------------------------------------------------------------------------------------------
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Name 저장</summary>
		/// <param name="sSPName">스토어드명</param>
		/// <param name="sJobMode">작업모드</param>
		/// <param name="nObjectId">오브젝트아이디</param>
		/// <param name="nSection">작업분야(Part/Code/Purchasing Part)</param>
		/// <param name="sPattern">패턴명</param>
		/// <returns>bool</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private bool mf_CUDPatternNameData(string sSPName, string sJobMode, int nObjectId, int nSection, string sPattern)
		{
			//---------------------------------------------------------------------------------------------------
			//Web Sql 정보 관련
			//---------------------------------------------------------------------------------------------------
			string sWebSql = null;
			string sWebArg = null;
			//---------------------------------------------------------------------------------------------------
			//Web Sql 실행 관련
			//---------------------------------------------------------------------------------------------------
			string sDataSet = null;
			DataSet oDataSet = null;
			int nRowCount = 0;
			int nColCount = 0;
			string sErrorMsg = null;
			bool nResultOK = false;

			try
			{
				//---------------------------------------------------------------------------------------------------
				//Web Sql 경로 만들기
				//---------------------------------------------------------------------------------------------------
				sWebSql = ComCls.cConst.PC_WEBSQL_WEBPARSE_URL;
				sWebArg = string.Format("?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}&{10}={11}&{12}={13}&{14}={15}",
										ComCls.cConst.PC_WEBSQL_MODE, ComCls.cConst.PC_WEBSQL_MODE_CUD,
										ComCls.cConst.PC_WEBSQL_TYPE, ComCls.cConst.PC_WEBSQL_TYPE_PARSE,
										ComCls.cConst.PC_WEBSQL_STYLE, ComCls.cConst.PC_WEBSQL_STYLE_SP,
										ComCls.cConst.PC_WEBSQL_CMD_SP, sSPName,
										"iJOBMODE", sJobMode,
										"iOBJECTID", nObjectId,
										"iSECTION", this.mv_nJobCode,
										"iPATTERN", sPattern);
				sWebSql += sWebArg;
				//---------------------------------------------------------------------------------------------------
				//Web Sql 실행
				//---------------------------------------------------------------------------------------------------
				if (this.mv_oFunc.pf_WpExecSql(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, ref sDataSet, ref oDataSet, ref nRowCount, ref nColCount, ref sErrorMsg) == true)
				{
					nResultOK = true;
					//저장 / 수정
					if (sJobMode.Contains("CREATE") || sJobMode.Contains("UPDATE"))
						ComCls.cException.MessageBoxShow(this, ComCls.cConst.PC_MSG_APPBOM_UPDATE, ComCls.cConst.PC_MSG_APPBOM_UPDATE_TITLE);
					//삭제
					if (sJobMode.Contains("DELETE"))
						ComCls.cException.MessageBoxShow(this, ComCls.cConst.PC_MSG_APPBOM_DELETE, ComCls.cConst.PC_MSG_APPBOM_DELETE_TITLE);
				}
				else
				{
					if (sErrorMsg != null)
					{
						ComCls.cException.ExceptionMessage(this, sErrorMsg, "mf_CUDPatternNameData()");
					}
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
			//---------------------------------------------------------------------------------------------------
			//결과 반환
			//---------------------------------------------------------------------------------------------------
			return nResultOK;
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Role 저장</summary>
		/// <param name="sSPName">스토어드명</param>
		/// <param name="sJobMode">작업모드</param>
		/// <param name="nObjectId">오브젝트아이디</param>
		/// <param name="nPatternObjectId">패턴 오브젝트아이디</param>
		/// <param name="sPatternSection">패턴부분(번호시퀀스 / 버전시퀀스 / 고정문자)</param>
		/// <param name="sFormat">패턴 포멧</param>
		/// <returns>bool</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		private bool mf_CUDPatternRoleData(string sSPName, string sJobMode, int nObjectId, int nPatternObjectId, string sPatternSection, string sFormat)
		{
			//---------------------------------------------------------------------------------------------------
			//Web Sql 정보 관련
			//---------------------------------------------------------------------------------------------------
			string sWebSql = null;
			string sWebArg = null;
			//---------------------------------------------------------------------------------------------------
			//Web Sql 실행 관련
			//---------------------------------------------------------------------------------------------------
			string sDataSet = null;
			DataSet oDataSet = null;
			int nRowCount = 0;
			int nColCount = 0;
			string sErrorMsg = null;
			bool nResultOK = false;

			int nPatternSection = 0;
			try
			{
				if (sPatternSection == "번호 시퀀스") nPatternSection = 1;
				else if (sPatternSection == "버전 시퀀스") nPatternSection = 2;
				else if (sPatternSection == "고정문자") nPatternSection = 3;

				//---------------------------------------------------------------------------------------------------
				//Web Sql 경로 만들기
				//---------------------------------------------------------------------------------------------------
				sWebSql = ComCls.cConst.PC_WEBSQL_WEBPARSE_URL;
				sWebArg = string.Format("?{0}={1}&{2}={3}&{4}={5}&{6}={7}&{8}={9}&{10}={11}&{12}={13}&{14}={15}&{16}={17}",
										ComCls.cConst.PC_WEBSQL_MODE, ComCls.cConst.PC_WEBSQL_MODE_CUD,
										ComCls.cConst.PC_WEBSQL_TYPE, ComCls.cConst.PC_WEBSQL_TYPE_PARSE,
										ComCls.cConst.PC_WEBSQL_STYLE, ComCls.cConst.PC_WEBSQL_STYLE_SP,
										ComCls.cConst.PC_WEBSQL_CMD_SP, sSPName,
										"iJOBMODE", sJobMode,
										"iOBJECTID", nObjectId,
										"iPATTERN_OBJECTID", nPatternObjectId,
										"iPATTERN_SECTION", nPatternSection,
										"iFORMAT", (sFormat == null) ? "" : sFormat);
				sWebSql += sWebArg;
				//---------------------------------------------------------------------------------------------------
				//Web Sql 실행
				//---------------------------------------------------------------------------------------------------
				if (this.mv_oFunc.pf_WpExecSql(ComCls.cConst.PE_WEBSQL_TYPE.PARSE, sWebSql, ref sDataSet, ref oDataSet, ref nRowCount, ref nColCount, ref sErrorMsg) == true)
				{
					nResultOK = true;
				}
				else
				{
					if (sErrorMsg != null)
					{
						ComCls.cException.ExceptionMessage(this, sErrorMsg, "mf_CUDPatternRoleData()");
					}
				}
			}
			catch (Exception ex)
			{
				throw ex;
			}
			//---------------------------------------------------------------------------------------------------
			//결과 반환
			//---------------------------------------------------------------------------------------------------
			return nResultOK;
		}
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [공용(public) 함수(Method)/API - 클래스 외부로 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 첫 문자를 "pf_" + 함수명 또는 API 함수명 으로 시작
		//         - 영문 대소문자로 시작하고 함수명이 긴 경우 대소문자 구분해서 명명('_' 사용가능!)
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>공용(public) 함수(Method) 선언 예</summary>
		/// <param name="sStr">공용(public) 함수(Method) 인자 선언 예</param>
		/// <returns>string</returns>
		///-------------------------------------------------------------------------------------------------------------------------
		public string pf_Hello(string sStr)
		{
			try
			{
				sStr = "Hello...";
			}
			catch (Exception ex)
			{
				throw ex;
			}

			return sStr;
		}
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
		#region [전역(private) 시스템 이벤트함수 - 클래스 내부만 노출]
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		//명명규칙 - 없음!
		//▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬▬
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>폼 로드 될 때 발생</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void frmCodeRole_Load(object sender, EventArgs e)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//공용함수 인스턴스 생성
				//---------------------------------------------------------------------------------------------------
				this.mv_oFunc = new ComCls.cFunction(this);
				//---------------------------------------------------------------------------------------------------
				this.mv_nJobCode = mf_GetJobCode();
				this.Text = this.mv_sJobName + " " + this.Text;
				//---------------------------------------------------------------------------------------------------
				//객체 사용 제어
				//---------------------------------------------------------------------------------------------------
				this.mf_EnableMode(false);
				//---------------------------------------------------------------------------------------------------
				//Pattern Name 데이터 ListView에 출력
				//---------------------------------------------------------------------------------------------------
				this.mf_ReadPatternNameListView();
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>폼 언로드 될 때 발생</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void frmCodeRole_FormClosing(object sender, FormClosingEventArgs e)
		{
			try
			{
				this.mv_oFunc.pf_CheckBomExitMsg(this.mv_frmMain.pv_bChildFormExitMsgDispOK, this.Text, ref e);
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>폼 언로드 되고 발생</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void frmCodeRole_FormClosed(object sender, FormClosedEventArgs e)
		{
			try
			{
				//폼 닫기가 확정된 경우에만 해쉬에서 제거
				this.mv_oFunc.pf_AppBomRun(ComCls.cConst.PE_ARGTYPE_APP_STATUS.EXIT, this.Text, null, null);
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Name List에서 List 한 항목을 선택했을 때</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void listViewPatternName_ItemSelectionChanged(object sender, ListViewItemSelectionChangedEventArgs e)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//객체 사용 제어
				//---------------------------------------------------------------------------------------------------
				this.mf_EnableMode(true);

				if (e.IsSelected == true)
				{
					this.txtPatternName.Text = e.Item.SubItems[1].Text;
					this.txtPatternName_ReadOnly.Text = e.Item.SubItems[1].Text;
					//---------------------------------------------------------------------------------------------------
					//Pattern Code 데이터 읽기
					//---------------------------------------------------------------------------------------------------
					this.mf_ReadPatternCodeListView("PATTERN_CODE", Convert.ToInt32(e.Item.Text), "");
					//---------------------------------------------------------------------------------------------------
					//Pattern Role 데이터 읽기
					//---------------------------------------------------------------------------------------------------
					this.mf_ReadPatternRoleGridView();
				}
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Add 버튼 클릭시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void btnAddPatternName_Click(object sender, EventArgs e)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//저장시 필수 값 여부 확인
				//---------------------------------------------------------------------------------------------------
				if (string.IsNullOrEmpty(this.txtPatternName.Text))
					ComCls.cException.MessageErrorBoxShow(this, ComCls.cConst.PC_ERROR_NO_PATTERNNAME, ComCls.cConst.PC_ERROR_NO_PATTERNNAME_TITLE);
				else
				{
					if (ComCls.cException.MessageConfirmBoxShow(this, string.Format("[{0}]{1}", this.txtPatternName.Text, ComCls.cConst.PC_MSG_APPBOM_UPDATE_LIST_CONFIRM),
																ComCls.cConst.PC_MSG_APPBOM_UPDATE_TITLE) == System.Windows.Forms.DialogResult.Yes)
					{
						//저장 및 반환 값 확인
						if (this.mf_CUDPatternNameData("SP_CODE_PATTERN_CUD", "CREATE_PATTERN_NAME", 0, this.mv_nJobCode, this.txtPatternName.Text) == true)
						{
							//---------------------------------------------------------------------------------------------------
							//PatternName 리스트 읽기
							//---------------------------------------------------------------------------------------------------
							this.mf_ReadPatternNameListView();
							//---------------------------------------------------------------------------------------------------
							//객체 사용 제어
							//---------------------------------------------------------------------------------------------------
							this.mf_EnableMode(false);
						}
					}
				}
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Delete 버튼 클릭시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void btnDeletePatternName_Click(object sender, EventArgs e)
		{
			try
			{
				if (this.listViewPatternName.SelectedItems != null)
				{
					if (ComCls.cException.MessageConfirmBoxShow(this, string.Format("[{0}]{1}", this.listViewPatternName.SelectedItems[0].SubItems[1].Text, ComCls.cConst.PC_MSG_APPBOM_DELETE_CONFIRM),
																ComCls.cConst.PC_MSG_APPBOM_DELETE_TITLE) == System.Windows.Forms.DialogResult.Yes)
					{
						//삭제 및 반환 값 확인
						if (this.mf_CUDPatternNameData("SP_CODE_PATTERN_CUD", "DELETE_PATTERN_NAME", Convert.ToInt32(this.listViewPatternName.SelectedItems[0].Text), this.mv_nJobCode, this.txtPatternName.Text) == true)
						{
							//---------------------------------------------------------------------------------------------------
							//PatternName 리스트 읽기
							//---------------------------------------------------------------------------------------------------
							this.mf_ReadPatternNameListView();
							//---------------------------------------------------------------------------------------------------
							//객체 사용 제어
							//---------------------------------------------------------------------------------------------------
							this.mf_EnableMode(false);
						}
					}
				}
				else
				{
					ComCls.cException.MessageErrorBoxShow(this, ComCls.cConst.PC_MSG_NOSELECT_LISTVIEW, ComCls.cConst.PC_MSG_NOSELECT_LISTVIEW_TITLE);
				}
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Refresh 버튼 클릭시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void btnPatternNameRefresh_Click(object sender, EventArgs e)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//객체 사용 제어
				//---------------------------------------------------------------------------------------------------
				this.mf_EnableMode(false);
				//---------------------------------------------------------------------------------------------------
				//Pattern Name 데이터 ListView에 출력
				//---------------------------------------------------------------------------------------------------
				this.mf_ReadPatternNameListView();

				this.txtPatternName.Text = "";
				this.txtPatternName_ReadOnly.Text = "";
				this.txtPrimaryPatternCode.Text = "";

				this.listViewEffectionCode.Items.Clear();
				this.dgvPatternRole.DataSource = null;
				this.dgvPatternRole.Rows.Clear();
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Open Code List 버튼 클릭시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void btnOpenCodeList_Click(object sender, EventArgs e)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//Code List 창 인스턴스 생성 및 Dialog 호출
				//---------------------------------------------------------------------------------------------------
				frmCodeListForRole oFrmCodeListForRole = new frmCodeListForRole(this.mv_frmMain, this, this.mv_sJobName);
				oFrmCodeListForRole.ShowDialog();
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Primary Pattern Code 의 Text 변경시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void txtPrimaryPatternCode_TextChanged(object sender, EventArgs e)
		{
			try
			{
				//---------------------------------------------------------------------------------------------------
				//Primary Pattern 에 Effection Code 목록 출력
				//---------------------------------------------------------------------------------------------------
				this.mf_ReadPatternCodeListView("EFFECTION_CODE", 0, this.txtPrimaryPatternCode.Text);
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Role Save 버튼 클릭시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void btnSaveRole_Click(object sender, EventArgs e)
		{
			bool bResult = true;
			bool bCheckNull = true;
			string sErrorMsg = null;

			try
			{
				//---------------------------------------------------------------------------------------------------
				//저장시 필수 값 여부 확인
				//---------------------------------------------------------------------------------------------------
				if (string.IsNullOrEmpty(this.txtPrimaryPatternCode.Text))
				{
					ComCls.cException.MessageErrorBoxShow(this, ComCls.cConst.PC_ERROR_NO_PATTERNCODE, ComCls.cConst.PC_ERROR_NO_PATTERNCODE_TITLE);
				}
				else
				{
					//---------------------------------------------------------------------------------------------------
					//Pattern Role GridView에 Null 체크 -> Null일경우 시스템오류발생
					//---------------------------------------------------------------------------------------------------
					for (int nRow = 0; nRow < this.dgvPatternRole.Rows.Count - 1; nRow++)
					{
						//Pattern Column값 체크
						if (this.dgvPatternRole.Rows[nRow].Cells[3].Value == null)
						{
							ComCls.cException.MessageErrorBoxShow(this, ComCls.cConst.PC_ERROR_NO_PATTERN, ComCls.cConst.PC_ERROR_NO_PATTERN_TITLE);
							bCheckNull = false;
							break;
						}
						//Format Column값 체크
						if (this.dgvPatternRole.Rows[nRow].Cells[4].Value == null)
						{
							ComCls.cException.MessageErrorBoxShow(this, ComCls.cConst.PC_ERROR_NO_FORMAT, ComCls.cConst.PC_ERROR_NO_FORMAT_TITLE);
							bCheckNull = false;
							break;
						}
					}
					//---------------------------------------------------------------------------------------------------
					//Null 체크 후 정상적으로 저장 가능 시
					//---------------------------------------------------------------------------------------------------
					if (bCheckNull == true)
					{
						if (ComCls.cException.MessageConfirmBoxShow(this, string.Format("[{0}]{1}", this.txtPrimaryPatternCode.Text, ComCls.cConst.PC_MSG_APPBOM_UPDATE_SAVE),
																	ComCls.cConst.PC_MSG_APPBOM_UPDATE_TITLE) == System.Windows.Forms.DialogResult.Yes)
						{
							//---------------------------------------------------------------------------------------------------
							//Pattern Role Data를 Loop를 돌려 저장
							//---------------------------------------------------------------------------------------------------
							for (int nRow = 0; nRow < this.dgvPatternRole.Rows.Count - 1; nRow++)
							{
								//Row의 헤더로 비교
								switch (this.dgvPatternRole.Rows[nRow].Cells[1].Value.ToString())
								{
									//저장 인 경우
									case "C":
										//저장 성공 -> 반환값 True 비교
										if (this.mf_CUDPatternRoleData("SP_CODE_PATTERN_ROLE_CUD", "CREATE_PATTERN_ROLE", 0,
											Convert.ToInt32(this.listViewPatternName.SelectedItems[0].Text),
											this.dgvPatternRole.Rows[nRow].Cells[3].Value.ToString(), this.dgvPatternRole.Rows[nRow].Cells[4].Value.ToString()) == true)
										{
											//저장한 행의 Action 값 변경 (R - Read)
											this.dgvPatternRole.Rows[nRow].Cells[1].Value = "R";
										}
										//저장 실패
										else
										{
											//에러메세지 생성 (저장하려는 행의 Pattern, Format 표기)
											sErrorMsg = string.Format("Pattern[{0}] / Format[{1}]", this.dgvPatternRole.Rows[nRow].Cells[3].Value.ToString(), this.dgvPatternRole.Rows[nRow].Cells[4].Value.ToString());
											bResult = false;
											break;
										}

										break;
									//수정 인 경우
									case "U":
										//저장 성공 -> 반환값 True 비교
										if (this.mf_CUDPatternRoleData("SP_CODE_PATTERN_ROLE_CUD", "UPDATE_PATTERN_ROLE", Convert.ToInt32(this.dgvPatternRole.Rows[nRow].Cells[0].Value.ToString()),
											Convert.ToInt32(this.listViewPatternName.SelectedItems[0].Text),
											this.dgvPatternRole.Rows[nRow].Cells[3].Value.ToString(), this.dgvPatternRole.Rows[nRow].Cells[4].Value.ToString()) == true)
										{
											//저장한 행의 Action 값 변경 (R - Read)
											this.dgvPatternRole.Rows[nRow].Cells[1].Value = "R";
										}
										//저장 실패
										else
										{
											//에러메세지 생성 (저장하려는 행의 Pattern, Format 표기)
											sErrorMsg = string.Format("Pattern[{0}] / Format[{1}]", this.dgvPatternRole.Rows[nRow].Cells[3].Value.ToString(), this.dgvPatternRole.Rows[nRow].Cells[4].Value.ToString());
											bResult = false;
											break;
										}

										break;
								}
							}
							if (bResult == true)
							{
								//성공메세지 출력
								ComCls.cException.MessageBoxShow(this, ComCls.cConst.PC_MSG_APPBOM_UPDATE, ComCls.cConst.PC_MSG_APPBOM_UPDATE_TITLE);
							}
							else
							{
								//에러메세지 출력
								ComCls.cException.MessageErrorBoxShow(this, sErrorMsg + ComCls.cConst.PC_MSG_APPBOM_UPDATE_ERROR, ComCls.cConst.PC_MSG_APPBOM_UPDATE_TITLE);
							}
						}
					}
				}
			}
			catch (Exception ex)
			{
				bResult = false;
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Role Delete 버튼 클릭시</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void btnDeleteRole_Click(object sender, EventArgs e)
		{
			bool bResult = true;
			string sErrorMsg = null;

			try
			{
				//---------------------------------------------------------------------------------------------------
				// 삭제 확인 여부
				//---------------------------------------------------------------------------------------------------
				if (ComCls.cException.MessageConfirmBoxShow(this, string.Format("[{0}]{1}", this.txtPatternName_ReadOnly.Text, ComCls.cConst.PC_MSG_APPBOM_DELETE_CONFIRM),
															ComCls.cConst.PC_MSG_APPBOM_DELETE_TITLE) == System.Windows.Forms.DialogResult.Yes)
				{
					//---------------------------------------------------------------------------------------------------
					//Pattern Role Data를 Loop를 돌려 저장
					//---------------------------------------------------------------------------------------------------
					for (int nRow = 0; nRow < this.dgvPatternRole.Rows.Count - 1; nRow++)
					{
						//삭제 실패 -> 반환값 False 비교
						if (this.mf_CUDPatternRoleData("SP_CODE_PATTERN_ROLE_CUD", "DELETE_PATTERN_ROLE", Convert.ToInt32(this.dgvPatternRole.Rows[nRow].Cells[0].Value.ToString()),
							Convert.ToInt32(this.listViewPatternName.SelectedItems[0].Text), "", "") == false)
						{
							//에러메세지 생성 (저장하려는 행의 Pattern, Format 표기)
							sErrorMsg = string.Format("Pattern[{0}] / Format[{1}]", this.dgvPatternRole.Rows[nRow].Cells[3].Value.ToString(), this.dgvPatternRole.Rows[nRow].Cells[4].Value.ToString());
							bResult = false;
							break;
						}
					}
					if (bResult == true)
					{
						ComCls.cException.MessageBoxShow(this, ComCls.cConst.PC_MSG_APPBOM_DELETE, ComCls.cConst.PC_MSG_APPBOM_DELETE_TITLE);
						//---------------------------------------------------------------------------------------------------
						//Pattern Role 데이터 읽기
						//---------------------------------------------------------------------------------------------------
						this.mf_ReadPatternRoleGridView();
					}
					else
					{
						ComCls.cException.MessageErrorBoxShow(this, sErrorMsg + ComCls.cConst.PC_MSG_APPBOM_DELETE_ERROR, ComCls.cConst.PC_MSG_APPBOM_DELETE_TITLE);
					}
				}
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>Pattern Role GridView 내 값 변경시 </summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void dgvPatternRole_CellValueChanged(object sender, DataGridViewCellEventArgs e)
		{
			try
			{
				if (e.RowIndex != -1 && e.ColumnIndex != -1 && e.ColumnIndex != 1)
				{
					if (this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value == null)
					{
						this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value = "C";
					}
					else
					{
						if (this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value.ToString() == "R")
						{
							this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value = "U";
						}
					}

					//if (this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value.ToString() == "C")
					//{
					//    this.dgvPatternRole.Rows[e.RowIndex].HeaderCell.Value = "추가";
					//}
					//else if (this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value.ToString() == "U")
					//{
					//    this.dgvPatternRole.Rows[e.RowIndex].HeaderCell.Value = "수정";
					//}
				}
				//else if (e.RowIndex != -1 && e.ColumnIndex != -1 && e.ColumnIndex == 1)
				//{
				//    if (this.dgvPatternRole.Rows[e.RowIndex].Cells[1].Value.ToString() == "R")
				//    {
				//        this.dgvPatternRole.Rows[e.RowIndex].HeaderCell.Value = "";
				//    }
				//}
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		///-------------------------------------------------------------------------------------------------------------------------
		/// <summary>데이터그리드뷰 행 그리기 시작 시 발생</summary>
		///-------------------------------------------------------------------------------------------------------------------------
		private void dgvPatternRole_RowPostPaint(object sender, DataGridViewRowPostPaintEventArgs e)
		{
			try
			{
				this.mv_oFunc.pf_DataGridViewRowHeaderImage(this.dgvPatternRole, e, 1);
			}
			catch (Exception ex)
			{
				ComCls.cException.ExceptionMessageBox(ex, this);
			}
		}
		#endregion

		//▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
	}// End class frmCodeRole
}// End namespace TimsXBX
